package com.example.demo.sqlplan.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.List;

/**
 * ******************************************************
 *
 * @author liugh9
 * @version 1.0
 * @classname SqlPlanQueryBlockSubDTO
 * @description
 * @date 2022/08/12 17:14
 * <p>
 * ******************************************************
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
//@JsonIgnoreProperties(ignoreUnknown = true)
public class SqlPlanQueryBlockSubDTO {
    /**
     * 查询id
     */
    @JsonProperty("select_id")
    private Integer selectId;
    /**
     *
     */
    @JsonProperty("r_loops")
    private Integer realLoops;
    /**
     *
     */
    @JsonProperty("r_total_time_ms")
    private BigDecimal realTotalTimeMs;
    /**
     *
     */
    @JsonProperty("const_condition")
    private String constCondition;
    /**
     *
     */
    private String operation;
    /**
     *
     */
    @JsonProperty("having_condition")
    private String havingCondition;
    /**
     *
     */
    @JsonProperty("union_result")
    private SqlPlanUnionResultDTO unionResult;
    /**
     *
     */
    private SqlPlanFileSortDTO filesort;
    /**
     *
     */
    private SqlPlanTableDTO table;
    /**
     *
     */
    private List<SqlPlanQueryBlockDTO> subqueries;
    /**
     *
     */
    @JsonProperty("read_sorted_file")
    private SqlPlanReadSortedFileDTO readSortedFile;
    @JsonProperty("block-nl-join")
    private SqlPlanBlockNlJoinDTO blockNlJoin;
    @JsonProperty("temporary_table")
    private SqlPlanTemporaryTableDTO temporaryTable;
}
